3.4.51 \(\int \frac {\cosh ^4(x)}{1-\sinh ^2(x)} \, dx\) [351]

Optimal. Leaf size=30 \[ -\frac {5 x}{2}+2 \sqrt {2} \tanh ^{-1}\left (\sqrt {2} \tanh (x)\right )-\frac {1}{2} \cosh (x) \sinh (x) \]

[Out]

-5/2*x-1/2*cosh(x)*sinh(x)+2*arctanh(2^(1/2)*tanh(x))*2^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {3270, 425, 536, 212} \begin {gather*} -\frac {5 x}{2}+2 \sqrt {2} \tanh ^{-1}\left (\sqrt {2} \tanh (x)\right )-\frac {1}{2} \sinh (x) \cosh (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cosh[x]^4/(1 - Sinh[x]^2),x]

[Out]

(-5*x)/2 + 2*Sqrt[2]*ArcTanh[Sqrt[2]*Tanh[x]] - (Cosh[x]*Sinh[x])/2

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 425

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(-b)*x*(a + b*x^n)^(p + 1)*
((c + d*x^n)^(q + 1)/(a*n*(p + 1)*(b*c - a*d))), x] + Dist[1/(a*n*(p + 1)*(b*c - a*d)), Int[(a + b*x^n)^(p + 1
)*(c + d*x^n)^q*Simp[b*c + n*(p + 1)*(b*c - a*d) + d*b*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c,
d, n, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &&  !( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomi
alQ[a, b, c, d, n, p, q, x]

Rule 536

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 3270

Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = FreeF
actors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1), x], x, T
an[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\cosh ^4(x)}{1-\sinh ^2(x)} \, dx &=\text {Subst}\left (\int \frac {1}{\left (1-2 x^2\right ) \left (1-x^2\right )^2} \, dx,x,\tanh (x)\right )\\ &=-\frac {1}{2} \cosh (x) \sinh (x)-\frac {1}{2} \text {Subst}\left (\int \frac {-3-2 x^2}{\left (1-2 x^2\right ) \left (1-x^2\right )} \, dx,x,\tanh (x)\right )\\ &=-\frac {1}{2} \cosh (x) \sinh (x)-\frac {5}{2} \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\tanh (x)\right )+4 \text {Subst}\left (\int \frac {1}{1-2 x^2} \, dx,x,\tanh (x)\right )\\ &=-\frac {5 x}{2}+2 \sqrt {2} \tanh ^{-1}\left (\sqrt {2} \tanh (x)\right )-\frac {1}{2} \cosh (x) \sinh (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 32, normalized size = 1.07 \begin {gather*} -2 \left (\frac {5 x}{4}-\sqrt {2} \tanh ^{-1}\left (\sqrt {2} \tanh (x)\right )+\frac {1}{8} \sinh (2 x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cosh[x]^4/(1 - Sinh[x]^2),x]

[Out]

-2*((5*x)/4 - Sqrt[2]*ArcTanh[Sqrt[2]*Tanh[x]] + Sinh[2*x]/8)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(97\) vs. \(2(22)=44\).
time = 0.54, size = 98, normalized size = 3.27

method result size
risch \(-\frac {5 x}{2}-\frac {{\mathrm e}^{2 x}}{8}+\frac {{\mathrm e}^{-2 x}}{8}+\sqrt {2}\, \ln \left ({\mathrm e}^{2 x}-3+2 \sqrt {2}\right )-\sqrt {2}\, \ln \left ({\mathrm e}^{2 x}-3-2 \sqrt {2}\right )\) \(50\)
default \(2 \sqrt {2}\, \arctanh \left (\frac {\left (2 \tanh \left (\frac {x}{2}\right )-2\right ) \sqrt {2}}{4}\right )+2 \sqrt {2}\, \arctanh \left (\frac {\left (2 \tanh \left (\frac {x}{2}\right )+2\right ) \sqrt {2}}{4}\right )+\frac {1}{2 \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}-\frac {1}{2 \left (\tanh \left (\frac {x}{2}\right )+1\right )}-\frac {5 \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2}-\frac {1}{2 \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {1}{2 \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {5 \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2}\) \(98\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(x)^4/(1-sinh(x)^2),x,method=_RETURNVERBOSE)

[Out]

2*2^(1/2)*arctanh(1/4*(2*tanh(1/2*x)-2)*2^(1/2))+2*2^(1/2)*arctanh(1/4*(2*tanh(1/2*x)+2)*2^(1/2))+1/2/(tanh(1/
2*x)+1)^2-1/2/(tanh(1/2*x)+1)-5/2*ln(tanh(1/2*x)+1)-1/2/(tanh(1/2*x)-1)^2-1/2/(tanh(1/2*x)-1)+5/2*ln(tanh(1/2*
x)-1)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 75 vs. \(2 (22) = 44\).
time = 0.48, size = 75, normalized size = 2.50 \begin {gather*} \sqrt {2} \log \left (-\frac {\sqrt {2} - e^{\left (-x\right )} + 1}{\sqrt {2} + e^{\left (-x\right )} - 1}\right ) - \sqrt {2} \log \left (-\frac {\sqrt {2} - e^{\left (-x\right )} - 1}{\sqrt {2} + e^{\left (-x\right )} + 1}\right ) - \frac {5}{2} \, x - \frac {1}{8} \, e^{\left (2 \, x\right )} + \frac {1}{8} \, e^{\left (-2 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)^4/(1-sinh(x)^2),x, algorithm="maxima")

[Out]

sqrt(2)*log(-(sqrt(2) - e^(-x) + 1)/(sqrt(2) + e^(-x) - 1)) - sqrt(2)*log(-(sqrt(2) - e^(-x) - 1)/(sqrt(2) + e
^(-x) + 1)) - 5/2*x - 1/8*e^(2*x) + 1/8*e^(-2*x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 163 vs. \(2 (22) = 44\).
time = 0.57, size = 163, normalized size = 5.43 \begin {gather*} -\frac {\cosh \left (x\right )^{4} + 4 \, \cosh \left (x\right ) \sinh \left (x\right )^{3} + \sinh \left (x\right )^{4} + 20 \, x \cosh \left (x\right )^{2} + 2 \, {\left (3 \, \cosh \left (x\right )^{2} + 10 \, x\right )} \sinh \left (x\right )^{2} - 8 \, {\left (\sqrt {2} \cosh \left (x\right )^{2} + 2 \, \sqrt {2} \cosh \left (x\right ) \sinh \left (x\right ) + \sqrt {2} \sinh \left (x\right )^{2}\right )} \log \left (-\frac {3 \, {\left (2 \, \sqrt {2} - 3\right )} \cosh \left (x\right )^{2} - 4 \, {\left (3 \, \sqrt {2} - 4\right )} \cosh \left (x\right ) \sinh \left (x\right ) + 3 \, {\left (2 \, \sqrt {2} - 3\right )} \sinh \left (x\right )^{2} - 2 \, \sqrt {2} + 3}{\cosh \left (x\right )^{2} + \sinh \left (x\right )^{2} - 3}\right ) + 4 \, {\left (\cosh \left (x\right )^{3} + 10 \, x \cosh \left (x\right )\right )} \sinh \left (x\right ) - 1}{8 \, {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)^4/(1-sinh(x)^2),x, algorithm="fricas")

[Out]

-1/8*(cosh(x)^4 + 4*cosh(x)*sinh(x)^3 + sinh(x)^4 + 20*x*cosh(x)^2 + 2*(3*cosh(x)^2 + 10*x)*sinh(x)^2 - 8*(sqr
t(2)*cosh(x)^2 + 2*sqrt(2)*cosh(x)*sinh(x) + sqrt(2)*sinh(x)^2)*log(-(3*(2*sqrt(2) - 3)*cosh(x)^2 - 4*(3*sqrt(
2) - 4)*cosh(x)*sinh(x) + 3*(2*sqrt(2) - 3)*sinh(x)^2 - 2*sqrt(2) + 3)/(cosh(x)^2 + sinh(x)^2 - 3)) + 4*(cosh(
x)^3 + 10*x*cosh(x))*sinh(x) - 1)/(cosh(x)^2 + 2*cosh(x)*sinh(x) + sinh(x)^2)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 2431 vs. \(2 (29) = 58\).
time = 8.29, size = 2431, normalized size = 81.03 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)**4/(1-sinh(x)**2),x)

[Out]

-2716698600*sqrt(2)*x*tanh(x/2)**4/(1536796802*tanh(x/2)**4 + 1086679440*sqrt(2)*tanh(x/2)**4 - 3073593604*tan
h(x/2)**2 - 2173358880*sqrt(2)*tanh(x/2)**2 + 1536796802 + 1086679440*sqrt(2)) - 3841992005*x*tanh(x/2)**4/(15
36796802*tanh(x/2)**4 + 1086679440*sqrt(2)*tanh(x/2)**4 - 3073593604*tanh(x/2)**2 - 2173358880*sqrt(2)*tanh(x/
2)**2 + 1536796802 + 1086679440*sqrt(2)) + 7683984010*x*tanh(x/2)**2/(1536796802*tanh(x/2)**4 + 1086679440*sqr
t(2)*tanh(x/2)**4 - 3073593604*tanh(x/2)**2 - 2173358880*sqrt(2)*tanh(x/2)**2 + 1536796802 + 1086679440*sqrt(2
)) + 5433397200*sqrt(2)*x*tanh(x/2)**2/(1536796802*tanh(x/2)**4 + 1086679440*sqrt(2)*tanh(x/2)**4 - 3073593604
*tanh(x/2)**2 - 2173358880*sqrt(2)*tanh(x/2)**2 + 1536796802 + 1086679440*sqrt(2)) - 2716698600*sqrt(2)*x/(153
6796802*tanh(x/2)**4 + 1086679440*sqrt(2)*tanh(x/2)**4 - 3073593604*tanh(x/2)**2 - 2173358880*sqrt(2)*tanh(x/2
)**2 + 1536796802 + 1086679440*sqrt(2)) - 3841992005*x/(1536796802*tanh(x/2)**4 + 1086679440*sqrt(2)*tanh(x/2)
**4 - 3073593604*tanh(x/2)**2 - 2173358880*sqrt(2)*tanh(x/2)**2 + 1536796802 + 1086679440*sqrt(2)) + 217335888
0*log(tanh(x/2) - 1 + sqrt(2))*tanh(x/2)**4/(1536796802*tanh(x/2)**4 + 1086679440*sqrt(2)*tanh(x/2)**4 - 30735
93604*tanh(x/2)**2 - 2173358880*sqrt(2)*tanh(x/2)**2 + 1536796802 + 1086679440*sqrt(2)) + 1536796802*sqrt(2)*l
og(tanh(x/2) - 1 + sqrt(2))*tanh(x/2)**4/(1536796802*tanh(x/2)**4 + 1086679440*sqrt(2)*tanh(x/2)**4 - 30735936
04*tanh(x/2)**2 - 2173358880*sqrt(2)*tanh(x/2)**2 + 1536796802 + 1086679440*sqrt(2)) - 4346717760*log(tanh(x/2
) - 1 + sqrt(2))*tanh(x/2)**2/(1536796802*tanh(x/2)**4 + 1086679440*sqrt(2)*tanh(x/2)**4 - 3073593604*tanh(x/2
)**2 - 2173358880*sqrt(2)*tanh(x/2)**2 + 1536796802 + 1086679440*sqrt(2)) - 3073593604*sqrt(2)*log(tanh(x/2) -
 1 + sqrt(2))*tanh(x/2)**2/(1536796802*tanh(x/2)**4 + 1086679440*sqrt(2)*tanh(x/2)**4 - 3073593604*tanh(x/2)**
2 - 2173358880*sqrt(2)*tanh(x/2)**2 + 1536796802 + 1086679440*sqrt(2)) + 2173358880*log(tanh(x/2) - 1 + sqrt(2
))/(1536796802*tanh(x/2)**4 + 1086679440*sqrt(2)*tanh(x/2)**4 - 3073593604*tanh(x/2)**2 - 2173358880*sqrt(2)*t
anh(x/2)**2 + 1536796802 + 1086679440*sqrt(2)) + 1536796802*sqrt(2)*log(tanh(x/2) - 1 + sqrt(2))/(1536796802*t
anh(x/2)**4 + 1086679440*sqrt(2)*tanh(x/2)**4 - 3073593604*tanh(x/2)**2 - 2173358880*sqrt(2)*tanh(x/2)**2 + 15
36796802 + 1086679440*sqrt(2)) + 2173358880*log(tanh(x/2) + 1 + sqrt(2))*tanh(x/2)**4/(1536796802*tanh(x/2)**4
 + 1086679440*sqrt(2)*tanh(x/2)**4 - 3073593604*tanh(x/2)**2 - 2173358880*sqrt(2)*tanh(x/2)**2 + 1536796802 +
1086679440*sqrt(2)) + 1536796802*sqrt(2)*log(tanh(x/2) + 1 + sqrt(2))*tanh(x/2)**4/(1536796802*tanh(x/2)**4 +
1086679440*sqrt(2)*tanh(x/2)**4 - 3073593604*tanh(x/2)**2 - 2173358880*sqrt(2)*tanh(x/2)**2 + 1536796802 + 108
6679440*sqrt(2)) - 4346717760*log(tanh(x/2) + 1 + sqrt(2))*tanh(x/2)**2/(1536796802*tanh(x/2)**4 + 1086679440*
sqrt(2)*tanh(x/2)**4 - 3073593604*tanh(x/2)**2 - 2173358880*sqrt(2)*tanh(x/2)**2 + 1536796802 + 1086679440*sqr
t(2)) - 3073593604*sqrt(2)*log(tanh(x/2) + 1 + sqrt(2))*tanh(x/2)**2/(1536796802*tanh(x/2)**4 + 1086679440*sqr
t(2)*tanh(x/2)**4 - 3073593604*tanh(x/2)**2 - 2173358880*sqrt(2)*tanh(x/2)**2 + 1536796802 + 1086679440*sqrt(2
)) + 2173358880*log(tanh(x/2) + 1 + sqrt(2))/(1536796802*tanh(x/2)**4 + 1086679440*sqrt(2)*tanh(x/2)**4 - 3073
593604*tanh(x/2)**2 - 2173358880*sqrt(2)*tanh(x/2)**2 + 1536796802 + 1086679440*sqrt(2)) + 1536796802*sqrt(2)*
log(tanh(x/2) + 1 + sqrt(2))/(1536796802*tanh(x/2)**4 + 1086679440*sqrt(2)*tanh(x/2)**4 - 3073593604*tanh(x/2)
**2 - 2173358880*sqrt(2)*tanh(x/2)**2 + 1536796802 + 1086679440*sqrt(2)) - 2173358880*log(tanh(x/2) - sqrt(2)
- 1)*tanh(x/2)**4/(1536796802*tanh(x/2)**4 + 1086679440*sqrt(2)*tanh(x/2)**4 - 3073593604*tanh(x/2)**2 - 21733
58880*sqrt(2)*tanh(x/2)**2 + 1536796802 + 1086679440*sqrt(2)) - 1536796802*sqrt(2)*log(tanh(x/2) - sqrt(2) - 1
)*tanh(x/2)**4/(1536796802*tanh(x/2)**4 + 1086679440*sqrt(2)*tanh(x/2)**4 - 3073593604*tanh(x/2)**2 - 21733588
80*sqrt(2)*tanh(x/2)**2 + 1536796802 + 1086679440*sqrt(2)) + 4346717760*log(tanh(x/2) - sqrt(2) - 1)*tanh(x/2)
**2/(1536796802*tanh(x/2)**4 + 1086679440*sqrt(2)*tanh(x/2)**4 - 3073593604*tanh(x/2)**2 - 2173358880*sqrt(2)*
tanh(x/2)**2 + 1536796802 + 1086679440*sqrt(2)) + 3073593604*sqrt(2)*log(tanh(x/2) - sqrt(2) - 1)*tanh(x/2)**2
/(1536796802*tanh(x/2)**4 + 1086679440*sqrt(2)*tanh(x/2)**4 - 3073593604*tanh(x/2)**2 - 2173358880*sqrt(2)*tan
h(x/2)**2 + 1536796802 + 1086679440*sqrt(2)) - 2173358880*log(tanh(x/2) - sqrt(2) - 1)/(1536796802*tanh(x/2)**
4 + 1086679440*sqrt(2)*tanh(x/2)**4 - 3073593604*tanh(x/2)**2 - 2173358880*sqrt(2)*tanh(x/2)**2 + 1536796802 +
 1086679440*sqrt(2)) - 1536796802*sqrt(2)*log(tanh(x/2) - sqrt(2) - 1)/(1536796802*tanh(x/2)**4 + 1086679440*s
qrt(2)*tanh(x/2)**4 - 3073593604*tanh(x/2)**2 - 2173358880*sqrt(2)*tanh(x/2)**2 + 1536796802 + 1086679440*sqrt
(2)) - 2173358880*log(tanh(x/2) - sqrt(2) + 1)*tanh(x/2)**4/(1536796802*tanh(x/2)**4 + 1086679440*sqrt(2)*tanh
(x/2)**4 - 3073593604*tanh(x/2)**2 - 2173358880...

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 61 vs. \(2 (22) = 44\).
time = 0.41, size = 61, normalized size = 2.03 \begin {gather*} \frac {1}{8} \, {\left (10 \, e^{\left (2 \, x\right )} + 1\right )} e^{\left (-2 \, x\right )} - \sqrt {2} \log \left (\frac {{\left | -4 \, \sqrt {2} + 2 \, e^{\left (2 \, x\right )} - 6 \right |}}{{\left | 4 \, \sqrt {2} + 2 \, e^{\left (2 \, x\right )} - 6 \right |}}\right ) - \frac {5}{2} \, x - \frac {1}{8} \, e^{\left (2 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)^4/(1-sinh(x)^2),x, algorithm="giac")

[Out]

1/8*(10*e^(2*x) + 1)*e^(-2*x) - sqrt(2)*log(abs(-4*sqrt(2) + 2*e^(2*x) - 6)/abs(4*sqrt(2) + 2*e^(2*x) - 6)) -
5/2*x - 1/8*e^(2*x)

________________________________________________________________________________________

Mupad [B]
time = 0.84, size = 66, normalized size = 2.20 \begin {gather*} \frac {{\mathrm {e}}^{-2\,x}}{8}-\frac {5\,x}{2}-\frac {{\mathrm {e}}^{2\,x}}{8}+\sqrt {2}\,\ln \left (16\,{\mathrm {e}}^{2\,x}+\sqrt {2}\,\left (12\,{\mathrm {e}}^{2\,x}-4\right )\right )-\sqrt {2}\,\ln \left (16\,{\mathrm {e}}^{2\,x}-\sqrt {2}\,\left (12\,{\mathrm {e}}^{2\,x}-4\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-cosh(x)^4/(sinh(x)^2 - 1),x)

[Out]

exp(-2*x)/8 - (5*x)/2 - exp(2*x)/8 + 2^(1/2)*log(16*exp(2*x) + 2^(1/2)*(12*exp(2*x) - 4)) - 2^(1/2)*log(16*exp
(2*x) - 2^(1/2)*(12*exp(2*x) - 4))

________________________________________________________________________________________